// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.brest.managesambafilesharing;


// Referenced classes of package com.funkyfresh.samba:
//            ShellCmd, LOG, Misc, FileOps, 
//            Dialogs

public class SupportLog {

	public SupportLog() {
	}

	/*
	 * private static final void cmdBanner(String s, String s1) { ShellCmd.run(
	 * (new StringBuilder("echo \"")).append("====================")
	 * .append("  ").append(s1).append("  ")
	 * .append("====================").append("\">>") .append(s).toString(), 2);
	 * }
	 * 
	 * public static final boolean create() { boolean flag = false;
	 * LOG.i("Samba Support Log generation"); String s =
	 * Misc.getExternalStorageName(); if (!FileOps.fileExists(s)) { LOG.e((new
	 * StringBuilder(String.valueOf(s)))
	 * .append(": directory does not exist: ").append(s) .toString()); } else {
	 * String s1 = Misc.getDateTime(); String s2 = (new
	 * StringBuilder(String.valueOf(s)))
	 * .append("/Samba-support-log_").append(s1).append(".txt") .toString();
	 * LOG.i((new StringBuilder("Writing to logfile: ")).append(s2)
	 * .toString()); createLog(s2); if (!FileOps.fileExists(s2)) {
	 * LOG.e("ERROR: Failed to create the file"); } else { cmdBanner(s2,
	 * " Samba Files List "); ShellCmd.run( (new
	 * StringBuilder("ls -l ")).append(BASEDIR)
	 * .append(".. ").append(BASEDIR).append(" ")
	 * .append(BASEDIR).append("var ").append(BASEDIR)
	 * .append("var/locks ").append(BASEDIR) .append("var/tmp ").append(BASEDIR)
	 * .append("private ").append(BASEDIR)
	 * .append("lib >>").append(s2).toString(), 2); cmdBanner(s2,
	 * " samba config file "); ShellCmd.run((new
	 * StringBuilder("cat ")).append(BASEDIR)
	 * .append("smb.conf >>").append(s2).toString(), 2); cmdBanner(s2,
	 * " smb log files "); ShellCmd.run( (new
	 * StringBuilder("cat ")).append(BASEDIR)
	 * .append("var/log.smbd ").append(BASEDIR)
	 * .append("var/log.nmbd >>").append(s2) .toString(), 2); cmdBanner(s2,
	 * " other files of interest "); ShellCmd.run( (new StringBuilder(
	 * "ls -l /system/bin/sh /system/xbin/sh /system/sbin/sh  /system/bin/su /system/xbin/su /system/sbin/su >>"
	 * )) .append(s2).toString(), 2); cmdBanner(s2, " Android properties ");
	 * ShellCmd.run((new StringBuilder("getprop >>")).append(s2) .toString(),
	 * 2); cmdBanner(s2, " filesystems mounted "); ShellCmd.run( (new
	 * StringBuilder("cat /proc/mounts >>")).append(s2) .toString(), 2);
	 * cmdBanner(s2, " Network interface info "); ShellCmd.run((new
	 * StringBuilder("ifconfig >>")).append(s2) .toString(), 2);
	 * ShellCmd.run((new StringBuilder("cat /proc/net/dev >>"))
	 * .append(s2).toString(), 2); cmdBanner(s2, " Shell environment ");
	 * ShellCmd.run((new StringBuilder("set >>")).append(s2) .toString(), 2);
	 * cmdBanner(s2, " CPU & Kernel info "); ShellCmd.run((new
	 * StringBuilder("cat /proc/cpuinfo >>")) .append(s2).toString(), 2);
	 * ShellCmd.run((new StringBuilder("uname -a >>")).append(s2) .toString(),
	 * 2); cmdBanner(s2, " Current process list "); ShellCmd.run( (new
	 * StringBuilder("ps >>")).append(s2).toString(), 2); cmdBanner(s2,
	 * " logcat "); ShellCmd.run((new StringBuilder("logcat -d >>")).append(s2)
	 * .toString(), 2); cmdBanner(s2, " dmesg "); ShellCmd.run((new
	 * StringBuilder("dmesg >>")).append(s2) .toString(), 2); flag = true; } }
	 * return flag; }
	 * 
	 * private static final void createLog(String s) { ShellCmd.run( (new
	 * StringBuilder(
	 * "echo \"==============================================================================\">"
	 * )) .append(s).toString(), 2); ShellCmd.run( (new StringBuilder(
	 * "echo \"This file may contain sensitive information from your device.\">>"
	 * )) .append(s).toString(), 2); ShellCmd.run( (new StringBuilder(
	 * "echo \"Please check the content & redact anything you think necessary before sending.\">>"
	 * )) .append(s).toString(), 2); ShellCmd.run( (new StringBuilder(
	 * "echo \"Dont post the log to a forum. Send this log through e-mail or PM.\">>"
	 * )) .append(s).toString(), 2); ShellCmd.run( (new StringBuilder(
	 * "echo \"==============================================================================\">>"
	 * )) .append(s).toString(), 2); }
	 * 
	 * public static final void handleCreatesupportlog(Context context) { String
	 * s = Misc.getExternalStorageName(); String s1; if (create()) s1 = (new
	 * StringBuilder( "Successfully created SambaFilesharing support log on "))
	 * .append(s)
	 * .append(". Look for a file named Samba-support-log-<date_and_time>.")
	 * .append(
	 * "\n\nPlease be sure to review and redact the support log contents before sending to anyone.\n"
	 * ) .toString(); else s1 = (new StringBuilder(
	 * "Bad News...\n\nFailed to create a support log on "))
	 * .append(s).toString(); Dialogs.d1(context, "Support log", s1, "OK"); }
	 */
	private static String BASEDIR = "/data/data/com.funkyfresh.samba/files/";

}
